Release 10.1A: OpenEdge Development:
Progress 4GL Reference
SCROLL statement
Moves data up or down in a frame with multiple rows. Use the SCROLL statement to scroll data up or down when you add or delete a line in a frame.
This statement is supported only for backward compatibility.
Note: Does not apply to SpeedScript programming.Syntax
FROM-CURRENTScrolls UP or DOWN rows of data at or below the current cursor location. When scrolling UP, a new line opens at the bottom of the frame. When scrolling DOWN, a new line opens at the current cursor location. For example:
![]()
If you do not use the FROM-CURRENT option, then the entire frame scrolls up or down and the newly opened line appears at the top or bottom of a frame, respectively.
FROM-CURRENT limits scrolling from the current cursor position to the bottom of the frame.
UPScrolls rows of data up and off the frame and opens a line at the bottom of the frame. UP is the default. For example:
![]()
DOWNScrolls rows of data down and off the frame and opens a line at the top of the frame. For example, the Original Frame in the next example shows four rows of data. The highlighted bar is the current cursor position and the frame is a scrolling frame. On the right, the SCROLL FROM-CURRENT DOWN statement opens a line in the frame at the current cursor location and moves the other rows down and off the frame. For example:
![]()
In the next example, the SCROLL DOWN statement opens a line at the top of the frame and moves the other rows of data down and off the frame:
![]()
frame-phraseSpecifies the overall layout and processing properties of a frame. For more information on
Examplesframe-phrase, see the Frame phrase reference entry.This procedure displays customer information and lets you try each scrolling option from a menu of selections:
The next procedure creates a scrolling frame of five iterations. The frame displays the
cust-num,name,address, andcityfor each customer. The status default message displays “Enter C to create, D to delete” as long as the procedure is running. You use arrow keys to move the highlighted cursor bar through the database, and to add or delete customers from the database. The CHOOSE statement lets you easily create this style menu. See the CHOOSE statement reference entry for more information.
The SCROLL statement controls the scrolling action in the frame when you create and delete customers. To add a customer to the database, type C. Create opens a line in the frame and the SCROLL statement moves data below the line down. Then you type the new customer information into the frame. Type D to delete a customer from the database. When you delete a customer, all rows below the deleted customer row move up one row.
You can perform the same function with fewer statements if you do not use the SCROLL statement. You can substitute the
r-chose1.pprocedure segment with ther-chose2.pto perform the delete function.
You can see the entire
r-chose2.pprocedure on-line. This example only shows the portion that is different from ther-chose1.pprocedure.The
r-cuhelp.pprocedure provides help for the cust-num field when a user presses HELP. It displays five customer names and numbers. The user can press (UP-ARROW), (DOWN-ARROW), to scroll down, or (RETURN) to exit.
See also
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |